<template>
  <el-card :loading="loading" :body-style="{ height: '100%' }" class="base-info-set">
    <div class="base-info-set__header">配置基础信息</div>
    <create-sections title="基础信息">
      <wk-form
        ref="wkBaseFrom"
        :model="fieldsForm"
        :rules="fieldsRules"
        :field-from="fieldsForm"
        :field-list="fields"
        label-position="top"
        @change="formChange"
      />
    </create-sections>
  </el-card>
</template>

<script>
import CreateSections from "@/components/CreateSections";
import WkForm from "../../officeManage/components/NewCom/WkForm";
export default {
  name: "BaseInfoSet",
  components: {
    CreateSections,
    WkForm,
  },
  props: {
    fields: Array,
    fieldsForm: Object,
    fieldsRules: Object,
  },
  data() {
    return {
      loading: false,
    };
  },
  methods: {
    /**
     * change
     */
    formChange(item, index, value) {
      this.$emit("change", item, index, value);
    },
  },
};
</script>

<style lang="scss" scoped>
.base-info-set {
  &__header {
    height: 40px;
    margin-bottom: 20px;
    padding: 0 10px;
    font-size: 17px;
    color: #333;
    font-weight: bold;
  }

  .wk-form {
    ::v-deep .el-form-item.is-textarea {
      flex: 0 0 100%;
    }
  }
}
</style>
